package com.ruoyi.supplier.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.supplier.domain.GysGr;
import com.ruoyi.supplier.mapper.GysGrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.GysPublicMapper;
import com.ruoyi.supplier.domain.GysPublic;
import com.ruoyi.supplier.service.IGysPublicService;

/**
 * 供应商列表Service业务层处理
 * 
 * @author itchen
 * @date 2024-07-15
 */
@Service
public class GysPublicServiceImpl extends ServiceImpl<GysPublicMapper, GysPublic> implements IGysPublicService
{
    @Autowired
    private GysPublicMapper gysPublicMapper;

    /**
     * 查询供应商列表
     * 
     * @param id 供应商列表主键
     * @return 供应商列表
     */
    @Override
    public GysPublic selectGysPublicById(Long id)
    {
        return gysPublicMapper.selectGysPublicById(id);
    }

    /**
     * 查询供应商列表列表
     * 
     * @param gysPublic 供应商列表
     * @return 供应商列表
     */
    @Override
    public List<GysPublic> selectGysPublicList(GysPublic gysPublic)
    {
        return gysPublicMapper.selectGysPublicList(gysPublic);
    }

    /**
     * 新增供应商列表
     * 
     * @param gysPublic 供应商列表
     * @return 结果
     */
    @Override
    public int insertGysPublic(GysPublic gysPublic)
    {
        gysPublic.setCreateTime(DateUtils.getNowDate());
        return gysPublicMapper.insertGysPublic(gysPublic);
    }

    /**
     * 修改供应商列表
     * 
     * @param gysPublic 供应商列表
     * @return 结果
     */
    @Override
    public int updateGysPublic(GysPublic gysPublic)
    {
        gysPublic.setUpdateTime(DateUtils.getNowDate());
        return gysPublicMapper.updateGysPublic(gysPublic);
    }

    /**
     * 批量删除供应商列表
     * 
     * @param ids 需要删除的供应商列表主键
     * @return 结果
     */
    @Override
    public int deleteGysPublicByIds(Long[] ids)
    {
        return gysPublicMapper.deleteGysPublicByIds(ids);
    }

    /**
     * 删除供应商列表信息
     * 
     * @param id 供应商列表主键
     * @return 结果
     */
    @Override
    public int deleteGysPublicById(Long id)
    {
        return gysPublicMapper.deleteGysPublicById(id);
    }
}
